/**
* @author AlbertDarren
* @contact 2563491540@qq.com
*/
#include <iostream>

using namespace std;

int main_32()
{
    freopen("ch2-loopStructureProgramming-ex2-2-hanxin.in","r",stdin);
    freopen("ch2-loopStructureProgramming-ex2-2-hanxin.out","w",stdout);
    int a,b,c,kase=0;
    while (scanf("%d%d%d",&a,&b,&c)!=EOF)
    {
        bool flag=false;
        int i=10;
        for (;i<=100 ;++i )
        {
            if ((i%3==a)&&(i%5==b)&&(i%7==c))
            {
                flag=true;
                break;
            }
        }
        ++kase;
        if (flag)
        {
            printf("Case %d: %d\n",kase,i);
        }
        else
        {
            printf("Case %d: No answer\n",kase);
        }
    }
	return 0;
}
